﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AppDialogBox
{
    internal partial class InputBox : Form
    {
        public InputBox(string title, string prompt, bool isPassword)
        {
            InitializeComponent();

            this.Text = title;
            this.labelPrompt.Text = prompt;
            this.textBox.UseSystemPasswordChar = isPassword;
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

    }
}
